home *** CD-ROM | disk | FTP | other *** search
/ Invisible Universe / Invisible Universe (1995)(Voyager)[Mac-PC].iso / mac / MOVIES / MIAWS / _NAV.DIR / 00004_Script_nb < prev    next >
Text File  |  1995-11-13  |  1KB  |  61 lines

  1. -- standard quickDraw button behavior
  2. --ancestor to navigation button trios [sbt]
  3. --property myChannel, myScript
  4. --
  5. --on birth me, sp,sc
  6. --  set myChannel to integer(sp)
  7. --  set myScript to sc
  8. --  return me
  9. --end
  10.  
  11. --change appearance
  12. on nbnorm theLine
  13.   global gNbNormalValue, gNormChan
  14.   
  15.   --put ">>>_NAV nbnorm" && theLine
  16.   
  17.   set gNormChan = 0
  18.   
  19.   set myChannel = integer(item 4 of theLine)
  20.   puppetSprite myChannel,TRUE
  21.   set the castNum of sprite myChannel to gNbNormalValue
  22.   updateStage
  23.   puppetSprite myChannel, false
  24. end 
  25.  
  26. on nbrollo myChannel, dummy
  27.   global gNbNormalValue, gNormChan
  28.   
  29.   --put ">>>_NAV nbrollo" && myChannel
  30.   
  31.   if myChannel = gNormChan then exit
  32.   
  33.   set gNormChan = myChannel
  34.   set gNbNormalValue = the castNum of sprite myChannel
  35.   
  36.   --put ">>> Setting the castNum to: " & gNbNormalValue+1
  37.   
  38.   -- note, we should sub-class the title bar...  to instead change the cursor
  39.   puppetSprite myChannel,TRUE
  40.   set the castNum of sprite myChannel to (gNbNormalValue+1)
  41.   updateStage
  42.   -- puppetSprite myChannel, false
  43.   
  44. end
  45.  
  46. on nbpress theLine  
  47.   global gNbNormalValue, gNormChan
  48.   
  49.   set myChannel = integer(item 4 of theLine)
  50.   
  51.   puppetSprite myChannel,TRUE
  52.   set the castNum of sprite myChannel to gNbNormalValue+2
  53.   updateStage
  54.   puppetSprite myChannel, false
  55. end
  56.  
  57. on nbdoScript theLine
  58.   do item 7 of theLine
  59. end  
  60.  
  61.